import React, {Component} from 'react';
import axios from 'axios';
import Search from "./components/Search";
import List from "./components/List";

class App extends Component {
    state ={
        users:[], //初始数组
        isFirst:true,//第一次进入打开页面
        isLoading:false,
        err:'',//错误信息
    }
    updateAppSate = (stateObj)=>{
        this.setState(stateObj)
    }

    render() {
        const {users}=this.state
        return (
            <div>
                <Search updateAppSate={this.updateAppSate}/>
                <List {...this.state}/>
            </div>
        );
    }
}

export default App;